﻿using UnityEngine;
class HornetAttackView : HitBoxBaseView, ICollisionPositionListener
{
    public void OnPosition(CollisionEntity entity, EntitasVec3 value)
    {
        transform.position = value;
    }

    private new void Awake()
    {
        base.Awake();
        Collisionentity.AddCollisionPositionListener(this);
        Collisionentity.AddPosition(transform.position);
        Collisionentity.isProjectile = true;
        Collisionentity.AddSpeed(.1f);
        Collisionentity.AddExpirationTime(10f);
    }

    private void OnDestroy()
    {
        if (Collisionentity.hasCollisionPositionListener)
            Collisionentity.RemoveCollisionPositionListener(this, true);
    }
}
